$(document).ready(function(){
	var face=$("#id_face").val();
	var id_target=$("#id_target").val();

	$("#upload_div").hide();
	$("#upload_img").show().find("img").attr("src","http://pay.ppwh.com.cn/"+id_target);

	if(face=="positive"){
		$("#id_positive",parent.document).val(id_target);
	}
	else{
		$("#id_back",parent.document).val(id_target);
	}

	$("iframe#if_"+face,parent.document).css("height",210);
	
});


function delete_img(){
	var face=$("#id_face").val();
	$("#id_target").val("");

	$("#upload_div").show();
	$("#upload_img").hide().find("img").attr("src","");
	if(face=="positive"){
		$("#id_positive",parent.document).val("");
	}
	else{
		$("#id_back",parent.document).val("");
	}

	$("iframe#if_"+face,parent.document).css("height",35);
}